package com.aoxun.dao.impl;

import java.util.List;

import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.aoxun.dao.ISysFunDao;
import com.aoxun.pojo.Sysfunmodule;

public class SysFunDaoImpl extends HibernateDaoSupport implements ISysFunDao {

	
	public List FatherList() {
		HibernateTemplate htmp=this.getHibernateTemplate();
		String hql="from Sysfunmodule where fatherModuleId=0 order by  moduleSeq";
		List list=htmp.find(hql);
		return list;
	}

	
	public List SonList(Sysfunmodule father) {
		HibernateTemplate htmp=this.getHibernateTemplate();
		String hql="from Sysfunmodule where fatherModuleId="+father.getId();
		hql+=" order by moduleSeq";
		List list=htmp.find(hql);
		return list;
	}

}
